<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>欢迎进入教务管理系统</title>

    <!-- Bootstrap Core CSS -->
    <link href="<%=request.getContextPath()%>/css/common_css/bootstrap_css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="<%=request.getContextPath()%>/css/common_css/sidebar_css/sidebar.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        function getinfo(teaid) {
            var atest=document.getElementById("txt").value
            var aset=document.getElementById("test")
            aset.setAttribute("href","SearchSelectName!searchSelectName?courseid="+teaid+"&keyword="+atest)
            aset.click()
        }
    </script>
</head>

<body>

<div id="wrapper">
    <!-- Page Content -->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">

                    <!--选课导航-->
                    <nav class="navbar navbar-default" role="navigation">
                        <div class="container-fluid">
                            <div class="navbar-header">
                                <a class="navbar-brand" href="#">查看信息</a>
                            </div>
                            <div>
                                <div class="navbar-form navbar-right" role="search">
                                    <div class="form-group">
                                        <input id="txt" type="text" class="form-control" placeholder="关键字">
                                    </div>
                                    <button class="btn btn-default" onclick="getinfo('<s:property value="#session.get('courseid')"></s:property>')">搜索</button><a href="#" id="test"></a>
                                    <a href="#menu-toggle" class="btn btn-default" id="menu-toggle">菜单</a>
                                </div>
                            </div>
                        </div>
                    </nav>
                    <!---->
                    <!--课程信息-->
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="table-responsive">
                                <table class="table table-bordered table-condensed table-hover">
                                    <thead>
                                    <tr>
                                        <th>选课学生姓名</th>
                                        <th>学号</th>
                                        <th>学院</th>
                                        <th>班级</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <s:iterator value="stuinfo">
                                        <tr>
                                            <td><s:property value="stuname"></s:property></td>
                                            <td><s:property value="stuid"></s:property> </td>
                                            <td><s:property value="anum"></s:property> </td>
                                            <td><s:property value="sclass"></s:property> </td>
                                        </tr>
                                    </s:iterator>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <!---->
                </div>
            </div>
        </div>
    </div>
    <!-- /#page-content-wrapper -->

</div>
<!-- /#wrapper -->

<!-- jQuery -->
<script src="<%=request.getContextPath()%>/js/common_js/jquery/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="<%=request.getContextPath()%>/js/common_js/bootstrap_js/bootstrap.min.js"></script>

<!--这是按表格中关键字搜索的代码，我不确定有没有用-->
<script>
    $(function(event){
        $("#sch").click(function(){
            var stxt=$("#txt").val();
            if($.trim(stxt)!=""){
                $("table tbody tr").hide().filter(":contains('"+stxt+"')").show();
            }else{
                $("table tbody tr").show();
            }
        });
    })
</script>

<!-- Menu Toggle Script -->
<script>
    $("#menu-toggle").click(function(e) {
        e.preventDefault();
        $("#wrapper").toggleClass("toggled");
    });
</script>
</body>

</html>
